from django.shortcuts import render

# Create your views here.
from .serializers import *
from rest_framework.viewsets import ModelViewSet # 视图集

class OptionViewSet(ModelViewSet):
    queryset = OptionModel.objects.all() # 获取所有选项
    serializer_class = OptionSerializer # 使用OptionSerializer序列化器

class QuestionViewSet(ModelViewSet):
    queryset = QuestionModel.objects.all() # 获取所有题目
    serializer_class = QuestionSerializer # 使用QuestionSerializer序列化器
